<#assign packageIndexStart=(introspectedTable.tableConfiguration.properties.fileDirectoryDO)?index_of("/src/main/java/")+15>
<#if introspectedTable.tableConfiguration.properties.fileDirectoryDO?length gt packageIndexStart>
package ${(introspectedTable.tableConfiguration.properties.fileDirectoryDO)?substring(packageIndexStart)?replace("/",".")};

</#if>
<#assign hasPrimaryKey=false/><#--表是否有主键-->
<#if introspectedTable.primaryKeyColumns ?size &gt;0 >
    <#assign hasPrimaryKey=true/>
</#if>
<#if introspectedTable.fullyQualifiedTable.introspectedTableName !="stlmt_checking_pool">
import com.baomidou.mybatisplus.annotation.*;
import com.broker.framework.mybatis.core.dataobject.BaseDO;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.extern.slf4j.Slf4j;
import java.time.LocalDateTime;
<#else>
import com.baomidou.mybatisplus.annotation.*;
import lombok.*;
import lombok.experimental.Accessors;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.type.JdbcType;
import java.time.LocalDateTime;
</#if>

<#-- 导入包，去除重复包 -->
<#assign ignoreFields=",createTime,updateTime,creator,updater,deleted,"/>
<#list introspectedTable.allColumns as allColumns>
<#assign paramType=allColumns.fullyQualifiedJavaType.fullyQualifiedNameWithoutTypeParameters /><#--定义局部变量-->
    <#if paramType ?index_of("java.lang")==-1 && paramType ?index_of("[]")==-1><#--java.lang的包不需要导入，数组也不要导入，比如byte[] -->
        <#list introspectedTable.allColumns as allColumns2>
            <#if allColumns2.fullyQualifiedJavaType.fullyQualifiedNameWithoutTypeParameters ?index_of("java.lang")!=0>
                <#if allColumns.fullyQualifiedJavaType.fullyQualifiedNameWithoutTypeParameters ==allColumns2.fullyQualifiedJavaType.fullyQualifiedNameWithoutTypeParameters>
                    <#if allColumns_index==allColumns2_index>
<#if ignoreFields?index_of(allColumns.javaProperty)==-1>
<#-- 导入包名 -->
import ${allColumns.fullyQualifiedJavaType.fullyQualifiedNameWithoutTypeParameters};
</#if>
                    <#else>
                        <#break >
                    </#if>
                </#if>
            </#if>
        </#list>
    </#if>
</#list>

/***
 * ---------------------------
 * @Description: 自动维护
 * 表备注：${introspectedTable.remarks!}<#--deal null-->
 * 数据库：${introspectedTable.tableConfiguration.schema!}
 * 表名：${introspectedTable.fullyQualifiedTable.introspectedTableName}
 *
 * ---------------------------
 * @author: ${introspectedTable.tableConfiguration.properties.auther!}
 * @date: ${introspectedTable.tableConfiguration.properties.createTime!}
 * @version: v1.0
 * ---------------------------
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@Accessors(chain = true)
@Builder
@Slf4j
@EqualsAndHashCode<#if introspectedTable.fullyQualifiedTable.introspectedTableName !="stlmt_checking_pool">(callSuper = true)</#if>
@TableName("${introspectedTable.fullyQualifiedTable.introspectedTableName}")
public class ${className}DO <#if introspectedTable.fullyQualifiedTable.introspectedTableName !="stlmt_checking_pool">extends BaseDO </#if>{

<#-- ----------  BEGIN 字段循环遍历  ---------->
<#-- 主键字段属性 -->
<#list introspectedTable.primaryKeyColumns as primaryKey>
    /**db字段:${primaryKey.actualColumnName}
     * ${primaryKey.remarks!} */
    @TableId(value = "${primaryKey.actualColumnName}", type = IdType.ASSIGN_ID)
    private ${primaryKey.fullyQualifiedJavaType.shortNameWithoutTypeArguments} ${primaryKey.javaProperty};

</#list>

<#-- 非主键字段属性 -->

<#list introspectedTable.nonPrimaryKeyColumns as baseColumns>
<#if ignoreFields?index_of(baseColumns.javaProperty)==-1>
    /**db字段:${baseColumns.actualColumnName}
     * ${baseColumns.remarks!} */
    @TableField(value = "${baseColumns.actualColumnName}")
<#--这里仅暂时兼容不符合规范的字段，（以下划线结尾的） ............. start.-->
    <#if baseColumns.actualColumnName?length-1==baseColumns.actualColumnName?last_index_of("_")>
    <#--这里仅暂时兼容不符合规范的字段，（以下划线结尾的），处理：结尾加下划线-->
    private ${baseColumns.fullyQualifiedJavaType.shortNameWithoutTypeArguments} ${baseColumns.javaProperty}_;
    <#else>
    private ${baseColumns.fullyQualifiedJavaType.shortNameWithoutTypeArguments} ${baseColumns.javaProperty};
    </#if>
<#--这里仅暂时兼容不符合规范的字段，（以下划线结尾的） ............. end.-->

</#if>
</#list>

<#if introspectedTable.fullyQualifiedTable.introspectedTableName =="stlmt_checking_pool">
    @TableField(fill = FieldFill.INSERT, jdbcType = JdbcType.VARCHAR)
    private String creator;

    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
</#if>


}
